Fix for Perl 5.12.x, bumped to v0.3

An error showed up when trying to fetch keys from a hash that was actually a reference in older versions of Perl. Explicitly added the cast.