I didn't see a specific variable that twitter-bootstrap exposes for this purpose and they don't attach all of their plugins to a namespace a la jQuery UI. Your next best bet is to test for one of the bootstrap plugins. Perhaps something like this:
if(typeof($.fn.modal) === 'undefined') {
//load bootstrap locally
}
The unfortunate thing about this is that it is brittle. If the modal plugin is ever renamed or removed this check would always fail.