Fix compile failure with Java6