Fix import of module codecs (for 2/3 compatibility)

As suggested by @qwcode in PR #5