Issue #3874: Distorted profile thumbnail

Fixes https://github.com/diaspora/diaspora/issues/3874