added support for defines detection