use JsFunction for constructors
Merge pull request #185 from a14n/use-jsfunction-for-constructors

use JsFunction for constructors