use defineProperty so that statics can't change
Merge pull request #2343 from nkcmr/master

use defineProperty so that statics can't change