Gcc472 bugfix fixes issue #148

fixes issue #148

gcc-4.7 changed, and explicitly breaks std::hash  I don't know why, but this patch fixes this, and several other build breaks and portability problems.