Overwriting native functions in javascript - The Spanner