Fix compilation under emulator