Free-riding is frequently a good strategy. If you don't want other people free-riding on you, sign contracts saying they can't. That means, for instance, don't use MIT license.