Use addPrefix to avoid deprecated calls in >2.2.0

I think this should take care of #642