Hacky fix for when 'mapping' is not present.

I have no idea whether this is the right thing to do or not, but it
seems to work.
Merge pull request #25 from diffeo/master

Thanks @BurntSushi and others. I had no time myself to test, but @chinchey and @JocelynDelalande tested it. Will merge and watch for fixes if needed.