A new agreement will see nations and social media giants work more closely together to tackle criminal gangs using online platforms to advertise.