I finally solved it myself. Turns out the sample iScroll provides initializes the scrolling div with document.addEventListener('DOMContentLoaded', loaded, false);
, but when this event is fired images might not have been loaded so their size is reported as 0.
Simply replacing it with:
window.addEventListener('load', loaded, false);
fixes it.