Fixed idris wrapper to make idris work with different backends.

Closes #4314