Fixed typemap for weak_ptr: http://stackoverflow.com/questions/27650755/swig-typemaps-with-smart-pointers/27662078#27662078