Added RegisterAttribute and IntPtr constructor

Fix for issue #16