Back port of #1142 to 0.5

If no rotation information in the header, the default is 0.