Do not define methods if they're already defined
Merge pull request #936 from strzalek/core_ext_enhancement

Hash core ext conditional definition