Fix class declaration detection

To be able to use something like this:
```coffeescript 
Application.register class Dispatcher ...
```