After graduation, a student has a limited amount of time to wind-up his affairs and exit the US. If you graduated in May and did not leave until Aug. 5, you remained past the deadline for your exit. Thus you have overstayed but did not accrue any illegal presence since your I-94 was D/S.
Since you did indeed overstay, you no longer qualify for the visa waiver. You should now apply for a B2 visa for entry into the US. If it is granted, you may enter on that.

