Monkey-patch native JavaScript constructor functions