Add support for instantiating unsafe encoders