I think your recent changes to atomics have caused some issues for building juce for iphone 3.1.3 sdk based apps (atomics are not supported by 3.1.3 as you know). Fine for simulator and 3.2 of course. Only a problem in recent git.
Errors when compiling juce_amalgamated.h:
error: there are no arguments to ‘OSAtomicAdd64’ that depend on a template parameter, so a declaration of ‘OSAtomicAdd64’ must be available
error: ‘OSAtomicIncrement64’ was not declared in this scope