fix warnings in goblib

Just removed some const-casts and pointer-to-int truncations.