Sprite.js: Fix for colored rectangles

Here is the sprite.js fix to add back the correct functionality for
drawing colored rectangles instead of images.