Expose asObject parameter to precompile function

Allow precompilation to return a string instead of an object