Combining Local and Global Perception for Autonomous Navigation on Nano-UAVs