Added support for associated objects.
Based on code found here: http://stackoverflow.com/questions/1916130/objc-setassociatedobject-unavailable-in-iphone-simulator