Remove depreciated syntax for function declaration

As per http://wiki.bash-hackers.org/scripting/obsolete, "function" has been depreciated.  Discovered/fixed with the help of tomased from #adagios on freenode.