Added work-around for gcc bug in AVX intrinsincs formal parameter

Many relatively recent gcc versions (4.5.2, possibly 4.6.0) use incorrect
formal parameters for maskload and maskstore intrinsics. This patch
detects the bug during configuration and works around it with a define.
Refs #1058, and fixes it at least from gcc-4.5.2.

Change-Id: I447a968d2153f5acf59ad170ace69ad1b6b3f24d
Merge "Added work-around for gcc bug in AVX intrinsincs formal parameter" into release-4-6