Fixing some bugs in the OSX HMD detection and GL rendering