Fix source code to compile with current rust master branch

Fixed all compilation errors; it now compiles and works with the current master.

Also removed all linker options except for -lleveldb - not sure why they are necessary, I have leveldb but I don't have snappy installed, but I can still use leveldb (even with compressed storage!).