Update boot.php

Adds defined check for ROOT
Fixes return value for ld