Replacing _.extend with my own extend function