Update basics.php

I am implementing the new ORM in an existing cake2 project. In order for this to work I need to include basics.php. The define statements causes error notices due to duplicate constants. Checking if constants are defined will fix these errors and give users the ability to start migrating their code.