Fix bugs

Fixed bugs which could prevent the library from compiling on other
machines.

Signed-off-by Parav Nagarsheth <parav.nagarsheth@gmail.com>