mkimage: Add variable lenght header support