This isn't the most elegant solution but there is a C based utility available at https://github.com/CdLbB/fb-rotate. To use the utility, click the download zip in Github. Extract the zip to your downloads folder and then run these commands in the terminal (copy and paste one line at a time, pressing enter after each line) to compile the program (only needs to be done once):
cd ~/Downloads/fb-rotate-master
gcc -w -o fb-rotate fb-rotate.c -framework IOKit -framework ApplicationServices
After that is done, you can run the program like this:
~/Downloads/fb-rotate-master/fb-rotate -d 0 -r 270
The 270 at the end is the rotation you would like. Applicable values are 0, 90, 180, 270. If you feel comfortable enough, you could move this out of your downloads folder, but you would need to edit those terminal commands. You could also turn it into an apple script to make the process easier. (Let me know if you need help with this)