the autoload path varies in composer installs

This should fix the problem @rixbeck found in https://github.com/bolt/bolt/pull/1256 

Using the constant won't work because it isn't set now until the initialisation, hence the failing tests. 

Whilst this if check doesn't look too pretty, it does only need to be here until the thumbs and upload separate files are phased out.