Remove dependency on jQuery.extend()