Port over changes from newer chez image lib