A simple bit of code to enable serialization of JavaScript functions.