Conditionally define maketrans wrapper

rather than checking on every call.

Also do version check consistently across modules.