More compile fixes, we now include stdint and replaced NULL with C++11's nullptr.