Refactor R detection
Fix R includes and try to force python3 on travis