Fix crash on mac/linux/unix systems.