Also copy function properties while wrapping function

Hey, I had some problems with wrapping define and require by require.js lately. Internally require.js sets:   

 ```javascript
define.amd = {
  jQuery: true
};
```

When wrapping the function this property gets not copied which caused some problems because it's very common to check for it to define AMD modules when available. Even jQuery itself does it:

 ```javascript
if ( typeof define === "function" && define.amd ) {
    define( "jquery", [], function () { return jQuery; } );
}
```

I'm not sure if my way of just copying the properties is the best way but I'm open for suggestions.