Added automatic version detecion