(Libretro) Portability fixes for several libretro targets