Only include lock_guard if boost version is high enough