Correctly storing the onmessage property of the Worker when constructing.