Add directory lock mechanism
Fix ios_sim build
Workaround for broken boost build