Fixes for GCC 4.7.
Version bump to 0.3.1
Regenerate gemspec for version 0.3.1