Update slimmage.js

Modified for closure compiler support.