Update core.js

Added the `isComplexObject` method.