Fix on extend method and others for compatibility with Knockout 3