[fix] ensure that params are returned as JRegistry object

This will ensure that the getTemplate function is compatible with the global getTemplate function.

I checked if there were some calls with an array as argument and it isn't used at all so the change to boolean in the getTemplate function definition doesn't affect anything.