Compiles with GCC (with many warnings), but makes Clang segfault in compilation
Fixed Clang segfault and warnings
Merge pull request #24 from ncorgan/ncorgan/compat

Fixed errors and warnings from GCC/Clang