Fix gemspec in order to make it buildable and installable

Fixed build errors and warnings.