Fix GLFW issues

While checking the GLFW3 branch, I saw two issues:
- Array with the key status can overflow; key mapping was wrong
MacOSX specific:
- Add missing link libraries