Fix versioning to be more compatible with older perl versions

Seems that older perl versions really hate the syntax of:

package <package name> <version>;

but can handle the older style where we set the version after the
package definition
Compatibility: pass hash instead of ref to keys or keys sort

A change happened somewhere in perl that allows you to pass a ref
to a hash to keys and it'll do the right thing.  CentOS is old
enough that that doesn't work.  If we force cast it back to a
proper hash, and then let keys run, it works fine.