Add get_version function

Add function to return the magic number for the given version enum. The
existing function that returns char* is renamed.
Update references to get_version function