User function templates needed

Compilation fails on Mac OSX unless UserFunction is declared with template arguments.