HADOOP-7868. Hadoop native fails to compile when default linker option is -Wl,--as-needed. Contributed by Trevor Robinson