support visibility attribute with gcc/clang - refs #1826