Recently I created my development server using php7.0.1, mysql5.7 and apache 2.4.20.
After I successfully got it running, I checked the file size of my server and found
The lib folder is there for you to compile MYSQL yourself if you want. So it is not required for normal running.
lib
So as long as you dont want to recompile MYSQL yourself you should be able to safely remove the whole folder.