Update bimserverapi.js

Added option to use synchronous AJAX calls (wait for Ajax to finish the request before continue).