libretro: only use posix_memalign when it's safe

I think this is better.