From https://code.google.com/p/privilegedaccessor/