The picture below shows my version of a much stronger bracket made from from a PVC plumbing cap.
The second picture shows the failed "builder's special" bracket.
Step 1: Getting Started
You will need (2) 1 1/4" PVC plumbing caps.
There are a few style caps to be aware of. The one pictured below is called a Plug and has a facetted flange around the base. The third photo shows two other style caps - a flat top cap and a domed top cap.
I used the plug only because my hardware store was out of the flat top cap. Either will work just fine. Just don't use the domed cap because the rounded top won't sit flat against the wall.