added additional checks in the configure to install brew on mac os x