Sydney, protesters reach agreement with police