More fixes to calling conventions and 4.1.2

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>