Make it compile on my Mac

The fdb header file is in another location on macs
Fix compilation warnings

llvm-gcc complained about these, -Wenum-conversion.
Use the NIF 64 signed int to avoid warning

int64_t is (long long), with llvm-gcc on the mac at
least, and ErlNifSInt64 is (long).