Adapt swarrot for php 5.3