tools: Fix rcompile to work under other LANG settings

This is because the only portable way to detect whether something
is a function is to use the output of 'type'. That output is
translated (the -t option is not portable).

Fixes #1380