Updated for SilverStripe 3.x compatibility.

Just updated enough to make this work with SilverStripe 3.0 and 3.1