Fixes GL fix, which was broken. Added -g flag to cmake, so we can have debug builds.
Fixes null ptr in gcc, probably to do with operator precedence. @Bigpet was all over this one.
Merge pull request #138 from bagedevimo/nix-fix

More *nix fixes.