Fix references to NULL; modify CMakeLists to allow compiling on non-addictgamer systems