Fix for unpremultiply, osx compiling

- fixed compiling on osx mavericks
- fixed unpremultiply