proplib: use GCC atomic builtins if supported.